IS-LM model (system DR)

y(t) - HDP v case t
t(t) - urokova miera v case t
IS - trovnovaha na kapitalovom trhu
Investicie + G = S + T
G - statne vydaje
S - uspory
T - dane

i0 = nezavisle investicie
i1 = urokova senzitivita investicii
a = nezavisla spotreba
b = marginalna spotreba
Inv = 10-i1r(t)
S = (1-b)(y(t)-T)-a

Inv = i0 - i1*r[t]

S = (1 - b)*(y[t] - T) - a

IS = (Inv + G == S + T)

ISnerovnovaha  =  Inv  +  G  -  (S + T)

LM - rovnovaha na financnom trhu
L - penazny dopyt
M - mnozstvo penazi
c0 - nezavisly dopyt
c1 - prijmova elasticita penazneho dopytu
c2 - urokova elasticita penazneho dopytu
L = c0+c1y(t)-c2r(t)

LM  =  (c0 + c1*y[t] - c2*r[t] == M)

LMnerovnovaha  =  c0 + c1*y[t] - c2*r[t] - M

Casova zmena uvazovanych parametrov je priamo umerna odchylke od rovnovahy na financnom (kapitalovom) trh.u

y'[t] == 
      Collect[Expand[K1*ISnerovnovaha], {y[t], r[t]}]

r'[t] == 
      Collect[Expand[K2*LMnerovnovaha], {y[t], r[t]}]

Konkretna situacia na slovensku pre rok 1995 (mld. Sk)

c0  =  356.6

c1 = 0.4

c2  =  18

M = 357.1

i0 = 150.66

i1 = 10.24

a = 5

b = 0.8826

T = 136.51

G = 171.43

K1 = 1

K2 = 0.5

Solve[{IS, LM}, {y[t], r[t]}]

y0 = 518

r0 = 15.64

ries  =  
      DSolve[{y'[t] == K1*ISnerovnovaha, r'[t] == 
            K2*LMnerovnovaha, y[0] == y0, r[0] == r0}, {y[t], 
          r[t]}, t]

trajektoria  =  
      ParametricPlot[{y[t], r[t]} /. ries, {t, 0, 89}, 
        PlotRange -> {{500, 625}, {10, 16}}, 
        GridLines -> Automatic]

P2->zmenene udaje

c0 = 0
c1 = 0.25
c2 = 1
M = 450
i0 = 0
i1 = 3
a = 400
b = 0.8
T = 0
G = 0
K1 = 0.4
K2 = 0.5

Solve[{IS, LM}, {y[t], r[t]}]

y0 = 1900

r0 = 10

ries  =  
      DSolve[{y'[t] == K1*ISnerovnovaha, r'[t] == 
            K2*LMnerovnovaha, y[0] == y0, r[0] == r0}, {y[t], 
          r[t]}, t]

trajektoria  =  
      ParametricPlot[{y[t], r[t]} /. ries, {t, 0, 130}, 
        PlotRange -> {{1830, 1900}, {8, 20}}, 
        GridLines -> Automatic]

Show[trajektoria,  Graphics[Text[equilibrium, {1850, 11}]]]

\(<< graphics\plotfield.m\)

g1 = 
      PlotVectorField[{Simplify[K1*ISnerovnovaha], 
          Simplify[K2*LMnerovnovaha]}, {y[t], 1830, 1900}, {r[t], 8, 20}, 
        PlotRange -> All, Axes -> True, AspectRatio -> 0.8, 
        ScaleFactor -> 5, PlotPoints -> 11]

trajektoria  =  
      ParametricPlot[{y[t], r[t]} /. ries, {t, 0, 130}, 
        PlotRange -> {{1830, 1900}, {8, 20}}, 
        AspectRatio -> 0.8]

Show[trajektoria, g1]